#include<bits/stdc++.h>
#define ll long long
#define ull unsigned long long
using namespace std;

const ll N = 1e6 + 10, INF = 0x3f3f3f3f;

ll n, k;
ll st[N];

void solve()
{
    cin >> n >> k;
    if (3 * n - 1 > k || n * (n + 1) / 2 + n < k) { cout << -1; return; }

    k -= 3 * n - 1;
    st[n - 1] = st[n] = 1;
    for (ll i = n - 2;i > 0;i--)
        if (i <= k) {
            st[i] = 1;
            k -= i;
        }

    for (ll i = 1;i <= n - 1;i++) if (st[i] == 1) cout << i << ' ';
    for (ll i = 1;i <= n - 1;i++) if (st[i] == 0) cout << i << ' ';
    cout << n;


}

signed main()
{
    //ios::sync_with_stdio(0);
    //cin.tie(0);cout.tie(0);
#define ONLINE_JUDGE
#ifndef ONLINE_JUDGE
    std::istringstream in(R"()");
    std::cin.rdbuf(in.rdbuf());
#endif
    ll T = 1;
    //cin>>T;
    for (ll i = 1;i <= T;i++) {
        solve();
    }
}